#ifndef GOLDFISHFB_H
#define GOLDFISHFB_H
#include <goldfish/fb.h>

#ifndef offset_of
#define offset_of(type, memb) \
	((unsigned long)(&((type *)0)->memb))
#endif
#ifndef container_of
#define container_of(obj, type, memb) \
	((type *)(((char *)obj) - offset_of(type, memb)))
#endif
		

struct goldfish_fb {
	uint32_t reg_base;
	int irq;
	spinlock_t lock;
	wait_queue_head_t wait;
	int base_update_count;
	int rotation;
	struct fb_info fb;
	u32			cmap[16];
#ifdef CONFIG_ANDROID_POWER
        android_early_suspend_t early_suspend;
#endif
};

extern struct goldfish_fb *goldfishfb;

extern unsigned int fbdom_dmabase, fbdom_paddr;

int goldfish_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info);
//extern struct fb_ops goldfish_fb_ops;
#endif
